{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "ede9c813",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "d:\\Program Files\\anaconda3\\envs\\neuronVis\\lib\\site-packages\\numpy\\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:\n",
      "d:\\Program Files\\anaconda3\\envs\\neuronVis\\lib\\site-packages\\numpy\\.libs\\libopenblas.FB5AE2TYXYH2IJRDKGDGQ3XBKLKTF43H.gfortran-win_amd64.dll\n",
      "d:\\Program Files\\anaconda3\\envs\\neuronVis\\lib\\site-packages\\numpy\\.libs\\libopenblas64__v0.3.21-gcc_10_3_0.dll\n",
      "  warnings.warn(\"loaded more than 1 DLL from .libs:\"\n"
     ]
    }
   ],
   "source": [
    "# %% import \n",
    "\n",
    "import sys,copy,os,inspect\n",
    "if hasattr(sys.modules[__name__], '__file__'):\n",
    "    _file_name = __file__\n",
    "else:\n",
    "    _file_name = inspect.getfile(inspect.currentframe())\n",
    "CURRENT_FILE_PATH = os.path.dirname(_file_name)\n",
    "sys.path.append(os.getcwd()+\"/../neuronVis\")\n",
    "import pandas as pd\n",
    "import Scene\n",
    "import BrainRegion as BR \n",
    "import IONData \n",
    "import matplotlib\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import seaborn as sns\n",
    "matplotlib.use('module://matplotlib_inline.backend_inline')\n",
    "%matplotlib inline\n",
    "iondata = IONData.IONData()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "e9244554",
   "metadata": {},
   "outputs": [],
   "source": [
    "import Visual as nv\n",
    "import json\n",
    "import SwcLoader as nt\n",
    "import Scene\n",
    "neuronvis = nv.neuronVis(size=(1700,1000),renderModel=0,species='mouse')\n",
    "\n",
    "neuronvis.render.setBackgroundColor((1.0,1.0,1.,1.0))\n",
    "\n",
    "neuronvis.setLineWidth(4)\n",
    "\t# neuronvis.addNeuronByID('17234','015.swc',somaColor=[0,1,0],somaHide=False,axonHide=False,dendriteHide=False,isLine=True)\n",
    "\t# neuronvis.addNeuronTree(tree,color=[1,0,0],isLine=False)\n",
    "tree= nt.NeuronTree()\n",
    "\t# tree.readFile('../resource/swc_merge/2-1merge.swc')\n",
    "\t# neuronvis.addNeuronTree(tree,color=[0,1,0],isLine=False)\n",
    "tree= nt.NeuronTree()\n",
    "tree.width=4\n",
    "tree.readFile('../resource/220188043.swc')\n",
    "neuronvis.addNeuronTree(tree,color=[0,0,1],axonColor=[1,0,0],isLine=False)\n",
    "\n",
    "neuronvis.render.run()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "neuronVis",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
